from functools import reduce

# 连续调用 lambda 计算
list_x = [1, 2, 3, 4, 5, 6, 7, 8]
# r = reduce(lambda x, y: x + y, list_x)
# 设置初始值
r = reduce(lambda x, y: x + y, list_x, 10)
print(r)
